package com.yidu.menuProject.dao;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yidu.menuProject.action.vo.ShowComment;
import com.yidu.menuProject.action.vo.UserComment;
import com.yidu.menuProject.common.Page;
import com.yidu.menuProject.model.CommentModel;

public interface CommentModelMapper {
    int deleteByPrimaryKey(String comId);

    int insert(CommentModel record);
    /**
     * 增加评论的方法
     * @param record
     * @return
     */
    int insertSelective(CommentModel record);

    CommentModel selectByPrimaryKey(String comId);

    int updateByPrimaryKeySelective(CommentModel record);

    int updateByPrimaryKey(CommentModel record);
    
    public List<UserComment> findComment(@Param("page") Page page,@Param("mealId") String mealId);
    
    public List<ShowComment> SelectCommentByMeal(String mealId);
    
    public List<ShowComment> SelectCommentByCoId(String coId);
    
    public int findTotalRows(String mealId);
    
    public int findTotalRowsWithAdd();
}